package com.ruoyi.logisticsassignment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.logisticsassignment.mapper.LogisticsassignmentMapper;
import com.ruoyi.logisticsassignment.domain.Logisticsassignment;
import com.ruoyi.logisticsassignment.service.ILogisticsassignmentService;

/**
 * 配送员Service业务层处理
 * 
 * @author sqltudent
 * @date 2025-07-01
 */
@Service
public class LogisticsassignmentServiceImpl implements ILogisticsassignmentService 
{
    @Autowired
    private LogisticsassignmentMapper logisticsassignmentMapper;

    /**
     * 查询配送员
     * 
     * @param assignmentId 配送员主键
     * @return 配送员
     */
    @Override
    public Logisticsassignment selectLogisticsassignmentByAssignmentId(Long assignmentId)
    {
        return logisticsassignmentMapper.selectLogisticsassignmentByAssignmentId(assignmentId);
    }

    /**
     * 查询配送员列表
     * 
     * @param logisticsassignment 配送员
     * @return 配送员
     */
    @Override
    public List<Logisticsassignment> selectLogisticsassignmentList(Logisticsassignment logisticsassignment)
    {
        return logisticsassignmentMapper.selectLogisticsassignmentList(logisticsassignment);
    }

    /**
     * 新增配送员
     * 
     * @param logisticsassignment 配送员
     * @return 结果
     */
    @Override
    public int insertLogisticsassignment(Logisticsassignment logisticsassignment)
    {
        return logisticsassignmentMapper.insertLogisticsassignment(logisticsassignment);
    }

    /**
     * 修改配送员
     * 
     * @param logisticsassignment 配送员
     * @return 结果
     */
    @Override
    public int updateLogisticsassignment(Logisticsassignment logisticsassignment)
    {
        return logisticsassignmentMapper.updateLogisticsassignment(logisticsassignment);
    }

    /**
     * 批量删除配送员
     * 
     * @param assignmentIds 需要删除的配送员主键
     * @return 结果
     */
    @Override
    public int deleteLogisticsassignmentByAssignmentIds(Long[] assignmentIds)
    {
        return logisticsassignmentMapper.deleteLogisticsassignmentByAssignmentIds(assignmentIds);
    }

    /**
     * 删除配送员信息
     * 
     * @param assignmentId 配送员主键
     * @return 结果
     */
    @Override
    public int deleteLogisticsassignmentByAssignmentId(Long assignmentId)
    {
        return logisticsassignmentMapper.deleteLogisticsassignmentByAssignmentId(assignmentId);
    }
}
